/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package hunterxhunter.greedisland.gui;

import hunterxhunter.greedisland.data.enums.NenType;

/**
 *
 * @author otaku
 */
public class NenSelectionDialog extends javax.swing.JDialog {

    /**
     * Creates new form NenSelectionDialog
     */
    public NenSelectionDialog(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        initComponents();
        setLocationRelativeTo(null);
    }

    
    public NenType getNenType() {
        if(jRadioButtonEnhacer.isSelected()) {
            return NenType.ENHANCER;
        } else if(jRadioButtonEmitter.isSelected()) {
            return NenType.EMITTER;
        } else if(jRadioButtonManipulator.isSelected()) {
            return NenType.MANIPULATOR;
        } else if(jRadioButtonTransmuter.isSelected()) {
            return NenType.TRANSMUTER;
        } else if(jRadioButtonConjurer.isSelected()) {
            return NenType.CONJURER;
        }
        return null;
    }
    
    /**
     * This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroupNen = new javax.swing.ButtonGroup();
        jRadioButtonEnhacer = new javax.swing.JRadioButton();
        jRadioButtonEmitter = new javax.swing.JRadioButton();
        jRadioButtonTransmuter = new javax.swing.JRadioButton();
        jRadioButtonConjurer = new javax.swing.JRadioButton();
        jRadioButtonManipulator = new javax.swing.JRadioButton();
        jButtonOK = new javax.swing.JButton();
        jLabel2 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Nen Type Selection");
        setMinimumSize(new java.awt.Dimension(569, 570));
        setPreferredSize(new java.awt.Dimension(569, 570));
        getContentPane().setLayout(null);

        jRadioButtonEnhacer.setBackground(new java.awt.Color(255, 255, 255));
        buttonGroupNen.add(jRadioButtonEnhacer);
        jRadioButtonEnhacer.setSelected(true);
        jRadioButtonEnhacer.setText("Enhancer");
        getContentPane().add(jRadioButtonEnhacer);
        jRadioButtonEnhacer.setBounds(290, 100, 91, 30);

        jRadioButtonEmitter.setBackground(new java.awt.Color(255, 255, 255));
        buttonGroupNen.add(jRadioButtonEmitter);
        jRadioButtonEmitter.setText("Emitter");
        jRadioButtonEmitter.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
        getContentPane().add(jRadioButtonEmitter);
        jRadioButtonEmitter.setBounds(30, 210, 76, 30);

        jRadioButtonTransmuter.setBackground(new java.awt.Color(255, 255, 255));
        buttonGroupNen.add(jRadioButtonTransmuter);
        jRadioButtonTransmuter.setText("Transmuter");
        getContentPane().add(jRadioButtonTransmuter);
        jRadioButtonTransmuter.setBounds(430, 210, 107, 30);

        jRadioButtonConjurer.setBackground(new java.awt.Color(255, 255, 255));
        buttonGroupNen.add(jRadioButtonConjurer);
        jRadioButtonConjurer.setText("Conjurer");
        getContentPane().add(jRadioButtonConjurer);
        jRadioButtonConjurer.setBounds(430, 350, 86, 30);

        jRadioButtonManipulator.setBackground(new java.awt.Color(255, 255, 255));
        buttonGroupNen.add(jRadioButtonManipulator);
        jRadioButtonManipulator.setText("Manipulator");
        jRadioButtonManipulator.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
        getContentPane().add(jRadioButtonManipulator);
        jRadioButtonManipulator.setBounds(0, 350, 111, 30);

        jButtonOK.setText("OK");
        jButtonOK.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonOKActionPerformed(evt);
            }
        });
        getContentPane().add(jButtonOK);
        jButtonOK.setBounds(500, 530, 54, 25);

        jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/greedisland/img/nen-selection.jpg"))); // NOI18N
        jLabel2.setFocusable(false);
        getContentPane().add(jLabel2);
        jLabel2.setBounds(0, 0, 569, 570);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jButtonOKActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonOKActionPerformed
        this.dispose();
    }//GEN-LAST:event_jButtonOKActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.ButtonGroup buttonGroupNen;
    private javax.swing.JButton jButtonOK;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JRadioButton jRadioButtonConjurer;
    private javax.swing.JRadioButton jRadioButtonEmitter;
    private javax.swing.JRadioButton jRadioButtonEnhacer;
    private javax.swing.JRadioButton jRadioButtonManipulator;
    private javax.swing.JRadioButton jRadioButtonTransmuter;
    // End of variables declaration//GEN-END:variables
}
